﻿using Entity;
using Microsoft.EntityFrameworkCore;

namespace DataBaseConnect
{
    public class MyDataBase : DbContext
    {
        public DbSet<User> User { get; set; }
        public DbSet<Menu> Menu { get; set; }
        public DbSet<MenuRole> MenuRole { get; set; }
        public DbSet<UserRole> UserRole { get; set; }
        public DbSet<Role> Role { get; set; }
        public DbSet<Button> Button { get; set; }
        public DbSet<ButtonStyle> ButtonStyle { get; set; }
        public DbSet<ButtonRole> ButtonRole { get; set; }
        public DbSet<Message> Message { get; set; }
        public DbSet<Form> Form { get; set; }
        public DbSet<Flow> Flow { get; set; }
        public DbSet<FlowType> FlowType { get; set; }
        public DbSet<Department> Department { get; set; }
        public DbSet<Leave> Leave { get; set; }


        //protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        //{
        //    optionsBuilder.UseSqlServer(@"Server=SQLOLEDB;Data Source=(local);uid=sa;pwd=123123;DataBase=myDataBase");
        //}

        public MyDataBase(DbContextOptions<MyDataBase> options) : base(options)
        {

        }

    }
}
